
CC=g++
CFLAGS=-c -Wall
FLAGS=-framework OpenGL -framework GLUT 
#-fno-enforce-eh-specs
#FLAGS = -lGL -lglut -lGLU
SOURCES=main.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=tutorial3

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
	$(CC) $(OBJECTS) -o $@ $(FLAGS)

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@


.PHONY: clean
clean:
	rm -f $(TARGET) $(OBJECTS)
	@echo    "----------------------------------------------"


